package com.qfedu.controller;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller  //标记是一个控制层
@RequestMapping
public class HelloController {

    public HelloController() {
        System.out.println("spring容器初始化了");
    }

    @RequestMapping("hello")
    public String hello(){
        System.out.println("hello 执行了");
        return "success";
    }
}
